{% extends "./inc/appbase.html" %}
{%block style%}
<style>
    .original {
        border: 1px solid #999;
        font-size: 10px !important;
        border-radius: 4px;
        line-height: 14px;
        width: 30px;
        color: #505050;
        text-align: center;
        margin-right: 5px;
        top: -2px;
        position: relative;
        padding: 0 1px;
    }
    .mui-bar-tab .mui-tab-item.mui-active {
        color: #929292;
    }
    .mui-table h4 ,.mui-media-body h4{
        line-height: 21px;
        font-weight: 400;
    }
</style>
{%endblock%}
{% block content %}
<header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">{{controller.meta_title}}</h1>
    <!--{% if controller.cart.data|length > 0 %}-->
    <!--<button class="mui-btn mui-btn-blue mui-btn-link mui-pull-right btn-edit" data-hide="1">编辑</button>-->
    <!--{%endif%}-->
</header>

<div class="mui-content">
    <form class="form-post" action="/center/cart/createorder" method="post" >

        <ul class="mui-table-view mui-table-view-radio">
            <li class="mui-table-view-divider">选择新的地址</li>
            {%for item in list %}
            <li class="mui-table-view-cell {%if id == item.id%}mui-selected{%endif%}">
                <input type="hidden"  name="address" value="{{item.id}}" >
                <a class="mui-navigate-right" href="/center/cart/getorderinfo/?addrid={{item.id}}&ids={{goodsget}}">
                    <div class="mui-table">
                        <div class="mui-table-cell mui-col-xs-10">
                            <h4 class="mui-ellipsis">{{item.accept_name}} <small>({{item.mobile}})</small></h4>
                            <h5>{{item.province}},{{item.city}},{{item.county}}</h5>
                            <p class="mui-h6 mui-ellipsis">{{item.addr}}</p>
                        </div>
                        <div class="mui-table-cell mui-col-xs-2 mui-text-right">
                            {%if item.is_default == 1%}<span class="mui-h5 original">默认</span>{%endif%}
                        </div>
                    </div>
                </a>
            </li>
            {%endfor%}
        </ul>
        <div class="mui-content-padded" style="margin-top: 20px; margin-bottom: 50px">
            <a href="/center/address/editaddrmodal" type="button" class="mui-btn mui-btn-primary mui-btn-block">添加新地址</a>
        </div>
    </form>
</div>

{% endblock%}

{% block script %}

{% endblock %}
